using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;

namespace Microsoft.Practices.Repository
{
    /// <summary>
    /// Interface to factory class that generates DbCommand to
    /// delete an existing domain object from the database.
    /// </summary>
    /// <typeparam name="TIdentityObject">The identity type of the domain object.</typeparam>
    public interface IDeleteFactory<TIdentityObject> : IDbToBusinessEntityNameMapper
    {
        /// <summary>
        /// Creates the delete command.
        /// </summary>
        /// <param name="db">Entlib Database object to construct the command for.</param>
        /// <param name="identity">Domain object identity.</param>
        /// <returns>Initialized DbCommand object.</returns>
        DbCommand ConstructDeleteCommand(Database db, TIdentityObject identity);
    }
}
